<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*"%>
<%@page import="java.util.Properties"%>
<%@page import="java.util.List"%>
<%@page import="persistency.TaskRepository"%>
<%@page import="model.Task"%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Display information from the table 'Task' of the DB
	'MiniServiceDesk'</title>
</head>
<body>

	<%
		TaskRepository tr = new TaskRepository();
		List<Task> resultSet = tr.getAll();
	%>

	<table border="1" cellspacing="0" cellpadding="0">
		<tr>

			<td>active</td>
			<td>description</td>
			<td>statuscode</td>
			<td>taskid</td>
			<td>unitcode</td>
			<td>Workhours</td>
			<td>Operator</td>
			<td>Price</td>
			<td>ServiceCall</td>
			<td>StartTime</td>
			<td>StopTime</td>

		</tr>
		<%
		System.out.println("RS size " + resultSet.size());
			for (Task task : resultSet) {
		%>
		<tr>

			<td>
				<%=
					task.isActive()
				%>
			</td>
			<td>
				<%=
					task.getDescription()
				%>
			</td>
			<td>
				<%=
					task.getStatusCode()
				%>
			</td>
			<td>
				<%=
					task.getTaskId()
				%>
			</td>
			<td>
				<%=
					task.getUnitCode()
				%>
			</td>
			<td>
				<%=
					task.getWorkhours()
				%>
			</td>
			<td>
				<%=
					task.getOperator()
				%>
			</td>
			<td>
				<%=
					task.getPrice()
				%>
			</td>
			<td>
				<%=
					task.getServicecall()
				%>
			</td>
			<td>
				<%=
					task.getStartTime()
				%>
			</td>
			<td>
				<%=
					task.getStopTime()
				%>
			</td>

		</tr>
		<%
			}
		%>
	</table>






</body>
</html>